from comm.db_conn import ConnMySQL
from comm.db_sql import INSERT_INTO_GROUP_DATE,SELECT_FROM
from mains.main import read_excl

if __name__ == '__main__':
    try:
        rec = read_excl("进博会保电-指令-v1.0.xlsx",0)
        ret = rec.read_return_list_dict()  # [[[],[],[]]
        ret_ = []
        for li in ret:
            if len(li)==5:
                ret_.append(tuple(li))

        conn_mysql = ConnMySQL()
        RET = conn_mysql.insert_values(INSERT_INTO_GROUP_DATE,ret_)
        # RET = conn_mysql.demo_fetchone(SELECT_FROM)
        print(RET)

    except Exception as f:
        print(f)



